﻿using AutoMapper;
using LowCodePlatform.CreateUpdateDto.RBAC;
using LowCodePlatform.Dto.RBAC;
using LowCodePlatform.Model.Rbac;

namespace LowCodePlatform
{
    public class LowCodePlatformApplicationAutoMapperProfile : Profile
    {
        public LowCodePlatformApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */
            #region RBAC映射
            CreateMap<UserModel,UserDto>();
            CreateMap<CreateUpdateUserDto, UserModel>();

            CreateMap<UserRightModel, UserRightDto>();
            CreateMap<CreateUpdateUserRightDto, UserRightModel>();

            CreateMap<UserGroupModel, UserGroupDto>();
            CreateMap<CreateUpdateUserGroupDto, UserGroupModel>();

            CreateMap<UserRoleModel, UserRoleDto>();
            CreateMap<CreateUpdateUserRoleDto, UserRoleModel>();

            CreateMap<RightModel, RightDto>();
            CreateMap<CreateUpdateRightDto, RightModel>();

            CreateMap<RoleModel, RoleDto>();
            CreateMap<CreateUpdateRoleDto, RoleModel>();

            CreateMap<RoleRightModel, RoleRightDto>();
            CreateMap<CreateUpdateRoleRightDto, RoleRightModel>();

            CreateMap<GroupModel, GroupDto>();
            CreateMap<CreateUpdateGroupDto, GroupModel>();

            CreateMap<GroupRightModel, GroupRightDto>();
            CreateMap<CreateUpdateGroupRightDto, GroupRightModel>();

            CreateMap<GroupRoleModel, GroupRoleDto>();
            CreateMap<CreateUpdateGroupRoleDto, GroupRoleModel>();

            CreateMap<LogModel, LogDto>();
            CreateMap<CreateUpdateLogDto, LogModel>();

            CreateMap<OrganizationModel, OrganizationDto>();
            CreateMap<CreateUpdateOrganizationDto, OrganizationModel>();


            #endregion
        }
    }
}
